<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../img/asset-favico.ico">
    <title>星晨男科医院动态管理系统</title>
    <link rel="stylesheet" href="../css/page-health-order.css"/>
</head>
<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
<div class="app" id="app">
    <!-- 页面头部 -->
    <div class="top-header">
        <span class="f-left"><i class="icon-back" onclick="history.go(-1)"></i></span>
        <span class="center">健康干预</span>
        <span class="f-right"><i class="icon-more"></i></span>
    </div>

    <!-- 页面内容 -->
    <div class="contentBox">
        <div class="list-column1">
            <ul class="list">
                <li class="list-item" v-for="order in orderList">
                    <div v-if="order.orderStatus == '已到诊'">
                        <a class="link-page" :href="'health-intervention.html?orderId='+order.id">
                            <img class="img-object f-left"
                                 :src="'http://qiw5r3qf0.hd-bkt.clouddn.com/'+order.setmeal.img"
                                 alt="">
                            <div class="item-body">
                                <h4 class="ellipsis item-title">{{order.setmeal.name}}</h4>
                                <p class="ellipsis-more item-desc">{{order.setmeal.remark}}</p>
                                <p class="item-keywords">
                                    <span>{{order.setmeal.sex == '0' ? '性别不限' : order.setmeal.sex == '1' ? '男':'女'}}</span>
                                    <span>{{order.setmeal.age}}</span>
                                </p>
                                <p class="ellipsis-more item-desc" style="color: blue ;font-size: 13px">
                                    到诊日期:{{order.orderDate}}</p>
                                <p class="ellipsis-more item-desc" style="color: blue ;font-size: 13px">
                                    到诊状态:{{order.orderStatus}}</p>
                            </div>
                        </a>
                    </div>
                    <div v-if="order.orderStatus == '未到诊'">
                        <a class="link-page" :href="'orderSuccess.html?orderId='+order.id">
                            <img class="img-object f-left"
                                 :src="'http://qiw5r3qf0.hd-bkt.clouddn.com/'+order.setmeal.img"
                                 alt="">
                            <div class="item-body">
                                <h4 class="ellipsis item-title">{{order.setmeal.name}}</h4>
                                <p class="ellipsis-more item-desc">{{order.setmeal.remark}}</p>
                                <p class="item-keywords">
                                    <span>{{order.setmeal.sex == '0' ? '性别不限' : order.setmeal.sex == '1' ? '男':'女'}}</span>
                                    <span>{{order.setmeal.age}}</span>
                                </p>
                                <p class="ellipsis-more item-desc" style="color: blue ;font-size: 13px">
                                    预约日期:{{order.orderDate}}</p>
                                <p class="ellipsis-more item-desc" style="color: red ;font-size: 13px">
                                    到诊状态:{{order.orderStatus}}</p>
                            </div>
                        </a>
                    </div>
                </li>
            </ul>
        </div>

    </div>
</div>
<!-- 页面 css js -->
<script src="../plugins/vue/vue.js"></script>
<script src="../plugins/vue/axios-0.18.0.js"></script>
<!--<script src="../js/page-health-order.js"></script>-->
<script>
    var vue = new Vue({
        el: '#app',
        data: {
            orderList: []//模型数据，用于套餐列表展示
        },
        mounted() {
            //发送ajax请求，获取所有的套餐数据，赋值给setmealList模型数据，用于页面展示
            axios.get("/order/findAllOrderSetmeal.do").then((res) => {
                if (res.data.flag) {
                    //查询成功，给模型数据赋值
                    this.orderList = res.data.data;
                }
            });
        }
    });
</script>
</body>